<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <div id="show"></div>
    <button>获取</button>
    <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.js"></script>
    <script>
    $(document).ready(function(){
        $("button").click(function(){
            $.get("test.txt", function(data){
                //alert("Data Loaded: " + data);
                $("#show").html(data);
            });
        });
    });
    </script>
</body>
</html>